import { Spin, Upload, UploadProps, message } from "antd"
import { useEffect, useMemo, useState } from "react";
import useUpload from "./useUpload";
interface ProUploadProps extends UploadProps {
    value?: any
    dataType?: 'string' | 'fileNameInValue' | 'array'
    onResponse?: Function
    fileName?:string
}

const ProUpload = ({ ...props }: ProUploadProps) => {
    const {children,...uploadProps} = useUpload(props)

    // console.log({ uploadFiles, rest, isControlled })
    return <Upload  
    
    {...uploadProps}

    //  action='https://boss-test.hiphopservice.com/file/upload' 
    //  listType='picture-card'
    >
        {children}

    </Upload>
}
export default ProUpload